package com.mybdqn.service;

import com.mybdqn.pojo.Permission;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* Service Interface Permission
*
* 2017-12-14
*/
public interface PermissionService {

    /**
     * 通过主键Id查询Permission
     */
    public Permission getPermissionById(Integer id)throws Exception;

    /**
     * 通过条件Map集合查询Permission
     */
    public List<Permission> getPermissionListByMap(Map<String, Object> param)throws Exception;

	/**
	 * 通过条件Map集合查询Permission记录总数
	 */
	public Integer getPermissionRecCountByMap(Map<String, Object> param)throws Exception;

    /**
     * 添加Permission新记录
     */
    public Integer insertPermission(Permission permission)throws Exception;

    /**
      * 更新Permission记录
      */
    public Integer updatePermission(Permission permission)throws Exception;

    /**
      * 通过主键Id删除Permission
      */
    public Integer deletePermissionById(Integer id)throws Exception;

    /**
     * 通过角色信息的集合查询对应的权限
     * @param roleNames
     * @return
     */
    public Set<String> getPermissionByRoleNames(Set<String> roleNames);
}